package com.sqoop.server.state;

import com.sqoop.server.BaseProcess;
import com.sqoop.server.factory.TaskManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * Created by zw on 2017/11/13.
 */
public class StatThread implements Runnable{
    private TaskManager taskManager;

    private static  Logger logger = LogManager.getLogger(StatThread.class.getName());

    @Override
    public void run() {

        for (Map.Entry<String, BaseProcess> entry:taskManager.getBaseProcessMap().entrySet()){
            StatInfo statInfo = entry.getValue().stat();
            logger.info(statInfo.toString());
        }

    }
}